<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition  xmlns="http://www.w3.org/1999/xhtml"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
                 xmlns:h="http://java.sun.com/jsf/html"
                 xmlns:f="http://java.sun.com/jsf/core"
                 xmlns:rich="http://richfaces.org/rich"
                 xmlns:a="http://richfaces.org/a4j">
<a:outputPanel id="cart">
<rich:panel>
    <f:facet name="header">购物车</f:facet>
    <h:outputText value="购物车为空" rendered="#{cart.isEmpty}"/>
    <ul>
	    <ui:repeat value="#{cart.cart}" var="_item">
	    <li><h:outputLink value="#">#{_item.product.name}</h:outputLink></li>
	    </ui:repeat>
    </ul>
    
    <h:link outcome="/cart.jsf" value=">>去结算" rendered="#{not cart.isEmpty}" style="float:right"/>
</rich:panel>
</a:outputPanel>
</ui:composition>